<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY nbsp "&#x00A0;">
]>
<xsl:stylesheet
	version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:msxml="urn:schemas-microsoft-com:xslt"
	xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
	exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">

  <xsl:output method="xml" omit-xml-declaration="yes"/>

  <xsl:param name="currentPage"/>
  <xsl:param name="campaignId" select="macro/campaignId"/>

  <xsl:template match="/">

    <!-- start writing XSLT -->
    <!-- display the advert which node id is in parameter (campaignId) -->
    <xsl:variable name="campaignNode" select="umbraco.library:GetXmlNodeById(macro/campaignId)" />
    <xsl:choose>
      <xsl:when test="string($campaignNode/@id) = false()">
        <!--there is no current advert : we have to put the default advert (an advert)-->

      </xsl:when>

      <xsl:otherwise>
        <!--we display the advert (we check wether the ad is an image, an app or a video) -->

      </xsl:otherwise>
    </xsl:choose>

    <!-- start writing XSLT -->

  </xsl:template>

</xsl:stylesheet>